package com.example.demo.mapper;

import com.example.demo.entity.Outstorage;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface OutstorageMapper {

    @Insert("insert into outstorage(Oid, Otime, Ocasenum, Otonnum, Osbelong, Ocost) values (#{Oid}, #{Otime}, #{Ocasenum}, #{Otonnum}, #{Osbelong}, #{Ocost})")
    int createOutstorage(Outstorage outstorage);

    @Delete("delete from outstorage where Oid = #{Oid}")
    int deleteOutstorage(Integer Oid);

    @Select("select * from outstorage where Oid = #{Oid}")
    Outstorage findOutstorage(Integer Oid);

    @Select("select * from outstorage")
    List<Outstorage> findAlloutstorages();
}

